package com.hjduan.spring.cloud.ribbon.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * Created by Administrator on 2017/7/11.
 */
@Service
public class RibbonHelloWordService {
    @Autowired
    RestTemplate restTemplate;

    public String ribbonHelloWordService(String name) {
        return restTemplate.getForObject("http://HJDUAN-SPRING-CLOUD-CONSUMER/hi/{name}",String.class,name);
    }

}
